#pragma once
#include <vector>
#include <comdef.h>
namespace VFAdapter {
	enum geom_entity_type
	{
		vf_geom_none = -1,
		vf_geom_any = 0,
		vf_vertex,
		vf_curve,
		vf_face,
		vf_loop,
		vf_body
	};
	enum vfHRESULT
	{
		vf_Success = 0,
		vf_Failure = 1,
		vf_Cancel = 2
	};
	//extern _declspec(dllexport) vfHRESULT vfStartLinkWithCAD(int iCadType);
	//extern _declspec(dllexport) vfHRESULT vfGetEntityType(uint64_t lID, geom_entity_type& enType);
	//extern _declspec(dllexport) vfHRESULT vfCreatePoint(double x, double y, double z, uint64_t& ptID);
	extern "C" _declspec(dllexport) vfHRESULT vfStartLinkWithCAD(int iCardType);
	extern "C" _declspec(dllexport) vfHRESULT vfGetEntityType(const char* inputValueString, char* objectType);
	extern "C" _declspec(dllexport) vfHRESULT vfCreatePoint(double x, double y, double z, long& ptID);
	extern "C" _declspec(dllexport) vfHRESULT vfCurveCurveIntersection(const char* lCurveTag1, const char* lCurveTag2, double& x, double& y, double& z, const char*& ptID);
	extern "C" _declspec(dllexport) vfHRESULT vfCurveSurfaceIntersection(const char* lCurveTag1, const char* lSurfaceTag1, double& x, double& y, double& z, const char*& ptID);
	extern "C" _declspec(dllexport) vfHRESULT SelectSingleByInteractive(geom_entity_type geoType, uint64_t & tagID, wchar_t* strMessage, bool bObjectActionParadigmPossibility);
	extern "C" _declspec(dllexport) vfHRESULT SelectByTag(uint64_t tagID);
	extern "C" _declspec(dllexport) vfHRESULT ClearSeletion();
	extern "C" _declspec(dllexport) vfHRESULT OffsetCurve(uint64_t curveID1, uint64_t surfaceID, double dis, uint64_t & curveID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateCurveBySurfaceIntersection(const char* surfaceID1, const char* surfaceID2, const char*& curveID);
	extern "C" _declspec(dllexport) vfHRESULT vfOffsetSurface(const char* surfaceID1, const char* pointID, double dis, const char*& surfaceID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateSurfaceByLoft(uint64_t * curveIDs, int num, uint64_t & surfaceID);
	extern "C" _declspec(dllexport) vfHRESULT vfSurfaceMerge(uint64_t * surfaceIDs, int num, uint64_t & newSurfaceID);
	//extern "C" _declspec(dllexport) vfHRESULT vfCreateSurfaceByFill(uint64_t * curveIDs, int num, uint64_t & surfaceID);
	extern "C" _declspec(dllexport) vfHRESULT vfSurfaceArea(const char* surfaceID, double& dArea);
	extern "C" _declspec(dllexport) vfHRESULT vfSurfacePerimeter(const char* surfaceID, double& dPerimeter);
	extern "C" _declspec(dllexport) vfHRESULT vfSurfaceWeight(const char* surfaceID, double SurfaceDensity, double& dWeight);
	extern "C" _declspec(dllexport) vfHRESULT vfSelectMultiyInteractive(geom_entity_type geoType, std::vector<uint64_t>&tagIDs, wchar_t* strMessage, bool bObjectActionParadigmPossibility);
	extern "C" _declspec(dllexport) vfHRESULT vfMirrorSurface(uint64_t surfaceID1, uint64_t mirrorPlaneID, bool bReserved, uint64_t & surfaceID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateCurveOnSurfaceByTwoPoints(const double* X1,
		const double* Y1,
		const double* Z1,
		const double* X2,
		const double* Y2,
		const double* Z2,
		const char* SurfaceID);

	extern "C" _declspec(dllexport) vfHRESULT vfMirrorCurve(uint64_t CruveID1, uint64_t mirrorPlane, bool bReserved, uint64_t & curveID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateCurveByProjection(uint64_t curveID1, uint64_t surfaceID, uint64_t & curveID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateSplineCurve(uint64_t * pointIDs, int num, bool bControlPt, uint64_t & curveID);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateBodyWithThickedSurface(uint64_t surfaceID, double thickness, uint64_t & bodyID);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateGravityOfSurface(const char* surfaceID, double& x, double& y, double& z);

	extern "C" _declspec(dllexport) vfHRESULT vfTestPointOnCurve(const char* pointID, const char* curveID, bool& bOn);
	extern "C" _declspec(dllexport) vfHRESULT vfTestPointOnSurface(const char* pointID, const char* surfaceID, int& result);
	extern "C" _declspec(dllexport) vfHRESULT vfTestPointOnSurface2(double x, double y, double z, const char* surfaceID, int& result);

	extern "C" _declspec(dllexport) vfHRESULT vfCreateRosette(const char* faceID, const char* pointID, const char* lineID, double startAngle, double directionAngle, double segmentLength, const char* HandDirection, const char*& RosetteID, const char*& Line1, const char*& Line2, const char*& Line3, const char*& Line4, const char*& Line5, const char*& Line6);
	extern "C" _declspec(dllexport) vfHRESULT vfChangeLineColorWidthInsertMap(const char* inputStringValue[]);
	extern "C" _declspec(dllexport) vfHRESULT vfChangeLineColorWidthFromMap(const char* inputStringValue[]);

	extern "C" _declspec(dllexport) vfHRESULT vfChangeTheColorLineWidth(const char* inputStringValue, int32_t * lineWidth, int32_t * colorR, int32_t * colorG, int32_t * colorB);
	extern "C" _declspec(dllexport) vfHRESULT vfRestoresColorLineWidth(const char* inputStringValue);
	extern "C" _declspec(dllexport) vfHRESULT vfRemoveTargetObject(const char* TargetIntValue);
	extern "C" _declspec(dllexport) vfHRESULT vfSelectionToID(const wchar_t* filterType, char* intValue);
	extern "C" _declspec(dllexport) vfHRESULT vfParameterInput(const char* userInput);
	extern "C" _declspec(dllexport) vfHRESULT vfSelectionToIDMore(const wchar_t* filterType, const char**& outputID);
	extern "C" _declspec(dllexport) vfHRESULT vfCESHI(const char* inputStringValue[], int32_t * lineWidth, int32_t * colorR, int32_t * colorG, int32_t * colorB);

	extern "C" _declspec(dllexport) vfHRESULT vfMousePtOnSurface(uint64_t surfaceID, double& x, double& y, double& z);
	extern "C" _declspec(dllexport) vfHRESULT vfMirrorObject(uint64_t objectID1, uint64_t mirrorPlane, bool bReserved, uint64_t & objectID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateCurveByMultiCurves(uint64_t * curveIDs, int num, bool bReserved, uint64_t & curveID);
	extern "C" _declspec(dllexport) vfHRESULT vfCurveTrim(uint64_t curveID, uint64_t objTrimingID, uint64_t & curveID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreatePointOnCurve(uint64_t curveID, double u, double& x, double& y, double& z, uint64_t & pointID);
	extern "C" _declspec(dllexport) vfHRESULT vfCreatePointOnSurface(uint64_t surfaceID, double u, double v, double& x, double& y, double& z, uint64_t & pointID);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateFunctionCurve(int cType, wchar_t* strExpression1, wchar_t* strExpression2, wchar_t* strExpression3, uint64_t & curveID);
	//extern "C" _declspec(dllexport) vfHRESULT vfChangeTheColorLineWidth(uint64_t objectID, int32_t* lineWidth, int32_t* colorR, int32_t* colorG, int32_t* colorB);
	//extern "C" _declspec(dllexport) vfHRESULT vfRestoresColorLineWidth(uint64_t objectID);
	//extern "C" _declspec(dllexport) vfHRESULT vfCreateRosette(uint64_t faceID, uint64_t pointID, uint64_t lineID, double startAngle, double directionAngle, double segmentLength, uint64_t* Line1, uint64_t* Line2, uint64_t* Line3, uint64_t* Line4, uint64_t* Line5, uint64_t* Line6);
	//extern "C" _declspec(dllexport) vfHRESULT vfRemoveTargetObject(uint64_t objectID);

	extern "C" _declspec(dllexport) vfHRESULT vfCurveLength(const char* CurveID, double& Length);
	extern "C" _declspec(dllexport) vfHRESULT vfCreatePointByProjection(const char* PointID1, const char* SurfaceID, const char*& PointID2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateSplitOrTrim(const char* CurveID1,
		const char* CurveID2,
		const char* CutType,
		int iOrientation1,
		int iOrientation2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreatPointByGeodesicDis(const char* surfaceID,
		const char* pointID1,
		double x,
		double y,
		double z,
		double geodesicDis,
		const char*& pointID2);
	extern "C" _declspec(dllexport) vfHRESULT vfGetIntersectCurve(const char* CurveID, const char**& IntersectCurveID);
	extern "C" _declspec(dllexport) vfHRESULT vfGeodesicLengthOfPointToCurve(const char* SurfaceID,
		const char* CurveID,
		const char* PointID,
		double x,
		double y,
		double z,
		double& GeodesicLength);
	extern "C" _declspec(dllexport) vfHRESULT vfGetUnitTangentVectorAtPoint(const char* CurveID,
		const char* PointID,
		int bOn,
		double& x,
		double& y,
		double& z);
	extern "C" _declspec(dllexport) vfHRESULT vfGetUnitNormalVectorAtPoint(const char* SurfaceID,
		const char* PointID,
		bool bOn,
		double& x,
		double& y,
		double& z);
	/*extern "C" _declspec(dllexport) vfHRESULT vfGetUnitNormalVectorAtPoint2(const char* SurfaceID,
		const char* PointID,
		bool bOn,
		double& x,
		double& y,
		double& z);*/
	extern "C" _declspec(dllexport) vfHRESULT vfGetPointByGeodesicDis(const char* surfaceID,
		double x, double y, double z,
		double dirx, double diry, double dirz,
		double geodesicDis,
		double& outputx,
		double& outputy,
		double& outputz,
		int& result);
	extern "C" _declspec(dllexport) vfHRESULT vfCreatPointByGeodesicDis2(const char* surfaceID,
		const char* pointID1,
		double x, double y, double z,
		double geodesicDis,
		double& outputx,
		double& outputy,
		double& outputz);
	extern "C" _declspec(dllexport) vfHRESULT vfGetCoordOfPoint(const char* PointID,
		double& x,
		double& y,
		double& z);
	extern "C" _declspec(dllexport) vfHRESULT vfTestPointOnSurfaceByProject(const char* SurfaceID,
		double px,
		double py,
		double pz,
		double dx,
		double dy,
		double dz,
		int& result);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateNormalLineAndArrowhead(const char* SurfaceID, const char* PointID);
	extern "C" _declspec(dllexport) vfHRESULT vfDeleteNormalLineAndArrowhead(const char* PointID);


	extern "C" _declspec(dllexport) vfHRESULT vfAddCommentOnPoint(const char* PointID, const char* Comment);
	extern "C" _declspec(dllexport) vfHRESULT vfDeleteCommentOnPoint(const char* PointID);
	//extern "C" _declspec(dllexport) vfHRESULT vfChangeSurfaceColorInsertMap(const char* inputStringValues[], int32_t R, int32_t G, int32_t B, const char* LineID);
	//extern "C" _declspec(dllexport) vfHRESULT vfChangeSurfaceColorFromMap(const char* AssembleLineID);
	extern "C" _declspec(dllexport) vfHRESULT vfChangePointColorInsertMap(const char* inputStringValue[], int32_t colorR, int32_t colorG, int32_t colorB);
	extern "C" _declspec(dllexport) vfHRESULT vfChangePointColorFromMap(const char* inputStringValue[]);

	extern "C" _declspec(dllexport) vfHRESULT vfGetActiveDocumentName(BSTR & ActiveDocumentName);
	extern "C" _declspec(dllexport) vfHRESULT vfDismantleCurve(const char* CurveID, const char**& DismantlesID, const char**& LineOrCurve, int& length);
	extern "C" _declspec(dllexport) vfHRESULT vfGetCurveStartAndEndPointCoordinates(const char* CurveID,
		double& Startx,
		double& Starty,
		double& Startz,
		double& Endx,
		double& Endy,
		double& Endz);
	extern "C" _declspec(dllexport) vfHRESULT vfGetEquidistantPointsOnCurve(const char* CurveID, int PointNums, double*& X, double*& Y, double*& Z);
	extern "C" _declspec(dllexport) vfHRESULT vfGetMinimumDistancePointCoordinates(const char* SurfaceID,
		double X1,
		double Y1,
		double Z1,
		double& X2,
		double& Y2,
		double& Z2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateSpline(BSTR Name, int Plane, int length, double* PointCoordinate1, double* PointCoordinate2);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateSpline2D(BSTR Name, int Plane, int length, double* PointCoordinate1, double* PointCoordinate2);
	extern "C" _declspec(dllexport) vfHRESULT vfGetPointUVByCAA(const char* SurfaceID, double X1, double Y1, double Z1, double& X2, double& Y2, double& Z2, double& U, double& V);
	extern "C" _declspec(dllexport) vfHRESULT vfGetEquidistantPointsOnCurveRing(const char* CurveID, int PointNums, double*& X, double*& Y, double*& Z);

	extern "C" _declspec(dllexport) vfHRESULT vfOffsetCurvesByParallel(const char* SurfaceID, const char* CurveID, const char* Orientation, double* GeodesicDistances, const char**& OffsetCurves);
	extern "C" _declspec(dllexport) vfHRESULT vfDeleteCurves(const char* Curves[]);
	extern "C" _declspec(dllexport) vfHRESULT vfOffsetCurveByStartPointAndEndPoint(const char* SurfaceID,
		const char* CurveID,
		const char* Orientation,
		double* StartPointGeodesicDistances,
		double* EndPointGeodesicDistances,
		const char**& OffsetCurves);
	extern "C" _declspec(dllexport) vfHRESULT vfOffsetCurvesBySymmetry(const char* SurfaceID, const char* CurveID, double* GeodesicDistances, const char**& OffsetCurves);
	extern "C" _declspec(dllexport) vfHRESULT vfOffsetCurveByStartPointAndEndPointBySymmetry(const char* SurfaceID,
		const char* CurveID,
		double* StartPointGeodesicDistances,
		double* EndPointGeodesicDistances,
		const char**& OffsetCurves);
	extern "C" _declspec(dllexport) vfHRESULT vfTrimOrExtendCurvesFromEndPoint(const char* Curves[], const char* Surface, double* X, double* Y, double* Z, double* Offsetength);
	extern "C" _declspec(dllexport) vfHRESULT vfGetUnitNormalVectorAtPoint2(const char* SurfaceID, double CoodX, double CoodY, double CoodZ, bool bOn, double& x, double& y, double& z);
	extern "C" _declspec(dllexport) vfHRESULT vfCreateSurfaceByFill(const char* Curves[], const char* Surface1, const char*& Surface2);
	extern "C" _declspec(dllexport) vfHRESULT vfDeleteSurfaces(const char* Surfaces[]);
	extern "C" _declspec(dllexport) vfHRESULT vfChangeSurfaceColorInsertMap(const char* Surfaces[], int* R, int* G, int* B);
	extern "C" _declspec(dllexport) vfHRESULT vfChangeSurfaceColorFromMap(const char* Surfaces[]);



};


